This disclosure relates to microprocessor system architecture, and more particularly to a microprocessor architecture that allows read-only memory (ROM) microcode to be effectively altered or enhanced without the need to reprogram or replace the ROM.
A microprocessor is a central processing unit (CPU) enclosed in one integrated circuit (IC) package. Because of their small size and low cost, microprocessors have revolutionized digital system design technology, giving the designer the capability to create structures that were previously uneconomical. Microprocessors are used in a wide variety of applications. They can function as a CPU in a general purpose computer or as a processor unit in a special purpose, automated system.
Microprocessor systems usually incorporate several different types of memory devices to hold data for processing and instructions for system control. Memory devices come in a wide variety of forms. Two of the more common forms are generally referred to as xe2x80x9cread-only memoryxe2x80x9d (ROM) and xe2x80x9crandom access memoryxe2x80x9d (RAM). In its simplest form, sometimes called xe2x80x9cmask-programmedxe2x80x9d, a ROM memory device is manufactured with fixed contents. The binary information stored in the ROM is made permanent during the hardware production of the unit and cannot subsequently be altered. Such a ROM memory unit allows the read operation only; it does not have a write capability. ROM is most often used to hold microcode, the lowest level instructions that directly control a microprocessor and immutable data such as tables of constants. As used herein, the term xe2x80x9cmicrocodexe2x80x9d can refer both to microprocessor instructions and immutable data programmed into ROM.
By contrast, a RAM is a data storage device that allows both the read and write function. A system CPU uses its RAM as a storage area for data, calculation results, and program instructions, drawing on this storage as necessary to perform the tasks required by programs. Its binary contents can easily be changed during operation and its stored data is typically erased or lost when the device incorporating it is powered off. Part of the initial xe2x80x9cpower-upxe2x80x9d or boot routine for microprocessor systems includes the loading of desired or necessary code into RAM according to the system design.
Microprocessor systems may also incorporate some type of xe2x80x9cnon-volatilexe2x80x9d memory, such as a hard-disk. Like RAM, such memory can usually be read or written to, but unlike RAM its content is preserved until over-written, even without system power.
More recent varieties of ROM provide for some limited programming capability after manufacture. PROM (xe2x80x9cprogrammable read-only memoryxe2x80x9d) devices can be programmed by the end user, but only once. EPROM (xe2x80x9cerasable programmable read-only memoryxe2x80x9d) can be erased and then reprogrammed, but must be removed from the system to do so. EEPROM (xe2x80x9celectronic erasable read-only memoryxe2x80x9d) can be erased and programmed electrically some limited number of times with standard supply voltages while in the system. However, such devices come with increased cost and limitations of their own. As noted, PROM can only be programmed once and EPROM must be removed from the system to be reprogrammed. EEPROM must be erased and reprogrammed in its entirety, not selectively. For many processing systems, especially those used to perform set, repetitive tasks, it is desirable to use the cheapest and simplest ROM, usually of the xe2x80x9cmask programmedxe2x80x9d variety, with minimal reliance on more expensive RAM or other types of memory devices.
In even the simplest microprocessor system it may be desirable to alter the contents of the ROM to, for example, correct errors in the microcode or add new capabilities to it. The disclosed system allows for alterations in the processing of ROM microcode or data without incurring the added expense and complexity of integrating some form of programmable ROM, large amounts of RAM, or nonvolatile memory into the system.
In accordance with this disclosure, a microprocessor system architecture allows for the selective execution of programmed ROM microcode or, alternatively, RAM microcode if there has been a correction or update made to the ROM microcode originally programmed into the system. Patched or updated RAM microcode is utilized or executed only to the extent of changes to the ROM microcode, otherwise the ROM microcode is executed in its normal fashion.
When a patch is received, it is loaded into system RAM along with instructions or other appropriate signals to direct the execution of the patched or updated microcode from RAM instead of the existing ROM microcode. Those skilled in the art will appreciate and understand that a variety of techniques can be utilized to direct the execution of patched or updated RAM microcode rather than corresponding ROM microcode, only a few of which are discussed in some detail below.